Support EXE software package ansible module, collected 2:Win_package (this time use this)Official Document: Http://docs.ansible.com/ansible/latest/modules/win_package_module.htmlWin_chocolateyOfficial Document: Http://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.htmlFor example, install the vc2013 (32-
Ansible @ an efficient configuration management tool-Ansible configure management-translation (4), ansible-ansibleDo not reprint without written permission
Due to the long content in Chapter 3, I will divide it into several parts for translation.
Advanced PlaybooksSo far the playbooks that we have looked at are simple and just run a number ofmodules in order.
Ansible @ an efficient configuration management tool-Ansible configure management-translation (10), ansible-ansibleNo written permission. Do not reprint it
Custom ModulesUntil now we have been working solely with the tools provided to us by Ansible.This does afford us a lot of power, and make many things possible. However, if youhave something particularly compl
Ansible @ an efficient configuration management tool-Ansible configure management-translation (8), ansible-ansibleIf you do not have written authorization, do not repeat Chapter 4. Use of Ansible in large projects
RolesIf your playbooks start expanding beyond what includes can help you solve, or youstart gathering a l
Ansible @ an efficient configuration management tool-Ansible configure management-translation (5), ansible-ansibleDo not reprint advanced Playbook without written permission
Extra variablesYou may have seen in our template example in the previous chapter that we used avariable called group_names . This is one of the magic variables that are provided byAnsible it
://search.rpmseek.com/search.html
2> install the EPEL installation package
# Rpm-vih epel-release-6-8.noarch.rpm
# Vim/etc/yum. repos. d/epel. repo modify the path. Otherwise, an error is reported.
Modify the file "/etc/yum. repos. d/epel. repo", uncomment the baseurl, and comment out the comment list;
3> install Ansible in YUM
# Yum-y install ansible
4> Configu
of pageInstalling AnsibleIf you are a centos/redhat, Debian, Ubuntu user, you can use the System Package Manager yum or Apt-get installation (Centos/redhat need to install Epel package to install via Yum). But here, I strongly recommend that you use PIP to install Ansible. So what is PIP? Pip is a Python package insta
console remotely, even a laptop.Host requirements for the Ansible management node:1, python2.6 or python2.72. Management node does not support Windows system3. Applicable system including Red Hat,centos,debian,os X, and BSD series systemAnsible host requirements for managed nodes:The managed node needs to install more than python2.4, but if the Python version is lower than python2.5, you will need to install the dependent
the techniques required when moving from asimple setup to a larger deployment. We discussed how to separate your playbookinto multiple parts using includes. We then looked at how we can package up relatedincludes and automatically include them all at once using roles. Finally we discussedpull mode, which allows you to automate the deployment of playbooks on theremote node itself.In the next chapter, we will cover writing your own modules. We start th
]# sed -i ‘s/^enabled=.*/enabled=1/g‘ /etc/yum.repos.d/163.repo //将设置好的163源传到受控主机[[emailprotected] ~]# ansible lanzhiyong -m template -a ‘src=/etc/yum.repos.d/163.repo dest=/etc/yum.repos.d/163.repo‘//查看受控机上是否有163源[[emailprotected] ~]# ls /etc/yum.repos.d/163.repo lanzhiyong.repo
The Yum Yum module for the 14.ansible Common module is used to manage software on the specified node machine via yum,
Ansible
Using the ansible command line
How to get Help
Installation methodIt is common for everyone to install and maintain packages using the package management tools that come with each system. However, you are not sure to get the latest or most reliable version of Ansible. Therefore, it is recommended
commands.?? Ansible-playbook is mainly used for long-term planning, large-scale project scenarios, and requires a prerequisite for planning9. ansible-playbook execution process:?? Write an existing job set to ansible-playbook?? Use the ansible-playbook command to split the task set to one
/test.shJoin content #!/bin/bash echo `date` > /tmp/ansible_test.txtThen distribute the script to each machine.ansible testhost -m copy -a "src=/tmp/test.sh dest=/tmp/test.sh mode=0755"Finally, the shell script is executed in bulkansible testhost -m shell -a "/tmp/test.sh"Shell module, also supports remote execution of commands and with pipelinesansible testhost -m shell -a "cat /etc/passwd|wc -l "Five Ansible Management task planansible testhost -m c
mode=600"ansible web_server -m file -a "dest=/tmp/hosts mode=600 owner=xuad group=xuad"ansible web_server -a "ls -lh /tmp/hosts"(27) Creating a directory with the file module, similar to performing a mkdir-p effectansible web_server -m file -a "dest=/tmp/test mode=755 owner=xuad group=xuad state=directory"(28) creating files using the file module, similar to performing touch effectsansible web_server -m fi
Yum:allow_downgrade: # Specify if the named package and version are allowed to downgrade a maybe Already installed higher version of the. Note that setting allow_downgrade=true can make this module is Has in a non-idempotent the. The task could end up with a set of packages this does not mat CH The complete list of specified packages to install (because Dependencies between the downgraded
Do not reprint without written permission
Due to the long content in Chapter 3, I will divide it into several parts for translation.
Advanced PlaybooksSo far the playbooks that we have looked at are simple and just run a number ofmodules in order. Ansible allows much more control over the execution of yourplaybook. Using the following techniques, you should be able to perform eventhe most complex deployments.Running operations in parallelBy default,
Do not reprint without written permissionThe third chapter is long, because, I will be divided into several parts to translate.Advanced Playbooksso far the playbooks, we have looked at is simple and just run a number ofmodules in order. Ansible allows much more control over the execution of Yourplaybook. Using The following techniques, you should is able to perform eventhe most complex deployments. Running operations in Parallelby default,
reads and executes the content in the install_nginx.yml file from the tasks directory during deployment. This file includes the following steps: Download, install, and start NGINX. We will create this file in the next section.Create deployment files for NGINX
Now, save the deploy. yml file and open install_nginx.yml in the editor.
$ vim $HOME/ansible-nginx/tasks/install_nginx.yml
This package contains c
:::* LISTEN 32212/httpdFinally, you can see that the remote host's HTTPD service listener's port has become 808.VARs variable
Using variables in playbook, you can directly define variables directly in the playbook, or you can define variables in other templates and drink them in the playbook file.
In the following example, add the VARs variable to the file in Httpd.yml[[emailprotected] ansible]# cat httpd.yml - hosts: webservs remote_us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.